style.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #board {
  2. padding: 25px 32px 32px 32px;
  3. h1 {
  4. font-size: 22px;
  5. margin-bottom: 20px;
  6. }
  7. // 검색 조건
  8. .list-header, .list-footer {
  9. select, input[type="search"], input[type="radio"] {
  10. height: 34px;
  11. }
  12. input[type="radio"] {
  13. position: absolute;
  14. opacity: 0;
  15. pointer-events: none;
  16. }
  17. a, button {
  18. line-height: 34px;
  19. padding: 0 15px;
  20. }
  21. }
  22. // 상단 제어 버튼
  23. .list-header {
  24. display: grid;
  25. grid-template-columns: 1fr auto auto;
  26. gap: 7px;
  27. align-items: end;
  28. section:first-child {
  29. flex: 1 1 auto;
  30. min-width: 0;
  31. }
  32. article {
  33. overflow: hidden; // 넘치는 애들은 숨김
  34. white-space: nowrap; // 줄바꿈 방지
  35. text-overflow: ellipsis; // 필요 시 말줄임
  36. display: flex;
  37. gap: 0.5rem;
  38. overflow-x: auto;
  39. -webkit-user-select: none;
  40. user-select: none;
  41. cursor: grab;
  42. touch-action: pan-y;
  43. ul {
  44. display: flex;
  45. gap: 0.5rem;
  46. li {
  47. flex-shrink: 0;
  48. label {
  49. display: block;
  50. line-height: inherit;
  51. padding: 0.25rem 0.75rem;
  52. background: #f1f1f1;
  53. border-radius: 6px;
  54. white-space: nowrap;
  55. cursor: pointer;
  56. &:hover, &:focus {
  57. color: #c7511f;
  58. background: #e1e1e1;
  59. text-decoration: underline;
  60. }
  61. &.active {
  62. background: #000;
  63. color: #f1f1f1;
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. // 하단 제어 버튼
  71. .list-footer {
  72. display: grid;
  73. grid-template-columns: 1fr auto;
  74. .search-toggle {
  75. display: none;
  76. }
  77. > section[aria-label='게시글 검색'] > form {
  78. display: flex;
  79. align-items: center;
  80. gap: 7px;
  81. }
  82. }
  83. @media (max-width: 576px) {
  84. .list-footer {
  85. grid-template-columns: auto 1fr auto;
  86. align-items: center;
  87. .search-toggle {
  88. grid-column: 1;
  89. display: inline-flex;
  90. align-items: center;
  91. justify-content: center;
  92. height: 100%;
  93. }
  94. > section[aria-label='게시글 검색'] {
  95. display: none;
  96. }
  97. > section[aria-label='글쓰기 버튼'] {
  98. grid-column: 3;
  99. }
  100. }
  101. }
  102. @media (max-width: 768px) {
  103. .list-footer {
  104. > section[aria-label='게시글 검색'] {
  105. form {
  106. padding-right: 7px;
  107. select {
  108. flex-grow: 0;
  109. }
  110. input {
  111. flex-grow: 1;
  112. }
  113. }
  114. }
  115. }
  116. }
  117. }